package com.huike.web.controller.contract;

import com.huike.clues.domain.TbActivity;
import com.huike.clues.domain.vo.IndexStatisticsVo;
import com.huike.common.annotation.Log;
import com.huike.common.core.controller.BaseController;
import com.huike.common.core.domain.AjaxResult;
import com.huike.common.core.domain.entity.SysUser;
import com.huike.common.core.page.TableDataInfo;
import com.huike.common.enums.BusinessType;
import com.huike.contract.domain.vo.TransferVo;
import com.huike.contract.service.ITransferService;
import com.huike.report.domain.vo.IndexVo;
import org.aspectj.weaver.AjAttribute;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/transfer")
public class TransferController extends BaseController {

    @Autowired
    private ITransferService transferService;

    @PutMapping("/assignment")
    public AjaxResult assignment(@RequestBody String type,@RequestBody Long userId,@RequestBody Long transferUserId){

        transferService.assignment(type,userId,transferUserId);
        return AjaxResult.success();
    }

    @GetMapping("/list")
    public TableDataInfo list(TransferVo vo) {

        startPage();
        List<TransferVo> list = transferService.selectallTransfer(vo);
        return getDataTable(list);
    }

}